package web1.bean;

import javax.servlet.http.Cookie;

public class COOKY {
	public static Cookie getCookieByName(Cookie[] cookies,String xxx) {
		if(cookies!=null) {
			for(int i=0;i<cookies.length;i++)
			{
				Cookie cookie=cookies[i];
				if(xxx.equals(cookie.getName())) {
					return cookie;
				}
			}
		}
		return null;
		
	}
}
